#ifndef __TTY_H__
#define __TTY_H__
#include "include/type.h"
#include "include/console.h"
#define TTY_IN_BYTES 256
#define V_MEM_BASE    0xB8000
#define V_MEM_SIZE    0x8000

struct s_console;
struct s_proc;
typedef struct s_tty
{
    u32 in_buf[TTY_IN_BYTES];
    u32 *p_inbuf_head;
    u32 *p_inbuf_tail;
    int inbuf_count;
    struct s_console *p_console;
}TTY;


void in_process(TTY *p_tty,u32 key);
void task_tty();
int sys_printx(int _unused1, int _unused2, char *s, struct s_proc *p_proc);
int tty_write(TTY* p_tty, char *buf, int len);
void out_char(struct s_console *p_con, char ch);
#endif